﻿namespace Rmq.Center
{
    public static class Const
    {
        /// <summary>
        /// RabbitMQ 服务连接地址
        /// </summary>
        public const string HostName = "127.0.0.1";

        /// <summary>
        /// RabbitMQ 服务用户名
        /// </summary>
        public const string UserName = "wesley";

        /// <summary>
        /// RabbitMQ 服务密码
        /// </summary>
        public const string Password = "hello!";

        // 交换机名称
        public const string ExchangeName = "GdsfybjyH5Mobile";

        // 延时交换机名称
        public const string DelayedExchangeName = "GdsfybjyH5MobileDelayed";

        /// <summary>
        /// 路由键集合
        /// </summary>
        public static readonly RoutingKey RoutingKeys = new RoutingKey();

        public class RoutingKey
        {
            /// <summary>
            /// 执行取消锁号操作
            /// </summary>
            public string OrderUnlocking { get; } = "Order.Unlocking";           

            /// <summary>
            /// 执行取消预约操作
            /// </summary>
            public string OrderUnappting { get; } = "Order.Unappting";

            /// <summary>
            /// 支付中超时的处理
            /// </summary>
            public string OrderPayingTimeout { get; } = "Order.Paying.Timeout";                        

            /// <summary>
            /// 执行退费, 因订单失败而退费
            /// </summary>
            public string OrderRefundingPickupFailed { get; } = "Order.Refunding.PickupFailed";

            /// <summary>
            /// 执行取号操作
            /// </summary>
            public string OrderPickuping { get; } = "Order.Pickuping";

            /// <summary>
            /// 执行取号结果检查操作
            /// </summary>
            public string OrderPickupingChk { get; } = "Order.Pickuping.Chk";

            /// <summary>
            /// 执行退号
            /// </summary>
            public string OrderUnpickuping { get; } = "Order.Unpickuping";

            /// <summary>
            /// 执行退号结果检查操作
            /// </summary>
            public string OrderUnpickupingChk { get; } = "Order.Unpickuping.Chk";

            /// <summary>
            /// 执行退费，因取消订单而退费
            /// </summary>
            public string OrderRefundingUnpickupSucceed { get; } = "Order.Refunding.UnpickupSucceed";

            /// <summary>
            /// 用户通知
            /// </summary>
            public string UserMessage { get; } = "User.Message";

            /// <summary>
            /// 医院主动发起的通知
            /// </summary>
            public string HospMessage { get; } = "Hosp.Message";
            /// <summary>
            /// 执行订单撤销
            /// </summary>
            public string OrderPayReverse { get; } = "Order.Pay.Reverse";

        }

        /// <summary>
        /// 队列集合
        /// </summary>
        public static readonly QueueName QueueNames = new QueueName();

        public class QueueName
        {
            /// <summary>
            /// 执行取消锁号操作
            /// </summary>
            public string OrderUnlocking { get; } = "Order.Unlocking";

            /// <summary>
            /// 执行取消预约操作
            /// </summary>
            public string OrderUnappting { get; } = "Order.Unappting";

            /// <summary>
            /// 支付中超时的处理
            /// </summary>
            public string OrderPayingTimeout { get; } = "Order.Paying.Timeout";

            /// <summary>
            /// 执行退费, 因订单失败而退费
            /// </summary>
            public string OrderRefundingPickupFailed { get; } = "Order.Refunding.PickupFailed";

            /// <summary>
            /// 执行取号操作
            /// </summary>
            public string OrderPickuping { get; } = "Order.Pickuping";

            /// <summary>
            /// 执行取号结果检查操作
            /// </summary>
            public string OrderPickupingChk { get; } = "Order.Pickuping.Chk";

            /// <summary>
            /// 执行退号
            /// </summary>
            public string OrderUnpickuping { get; } = "Order.Unpickuping";

            /// <summary>
            /// 执行退号结果检查操作
            /// </summary>
            public string OrderUnpickupingChk { get; } = "Order.Unpickuping.Chk";

            /// <summary>
            /// 执行退费，因取消订单而退费
            /// </summary>
            public string OrderRefundingUnpickupSucceed { get; } = "Order.Refunding.UnpickupSucceed";

            /// <summary>
            /// 用户通知
            /// </summary>
            public string UserMessage { get; } = "User.Message";

            /// <summary>
            /// 医院主动发起的通知
            /// </summary>
            public string HospMessage { get; } = "Hosp.Message";
            /// <summary>
            /// 执行订单撤销
            /// </summary>
            public string OrderPayReverse { get; } = "Order.Pay.Reverse";
        }
    }

    public enum OrderType
    {
        挂号订单 = 1,
        门诊缴费订单 = 2,
        住院预缴金订单 = 3,
        点餐订单 = 4,
        刷卡支付订单 = 5
    }
}
